#!/bin/sh
#
#
#
#
#

FILE=$1
#TITLE=$2
echo "Input file :${FILE}"
#echo "Plot title : ${TITLE}"
gnuplot -persist << EOF
#set boxwidth 0.9 absolute
set yrange[0:50]
set xtics rotate by -45
set term post eps
set output "${FILE}.ps"
set title "% of Raw Forwarders / Tree Size"
set xlabel "Tree Size"
set ylabel "% of Raw Forwarders"
set style data boxes
#set style histogram
# it will always fit in this range
set nokey
set xtics ("" 0, "5m (size: 9)" 1, "10m (size: 13)" 2, "20m (size: 24)" 3, "50m (size: 54)" 4, "" 5)
set auto x
set size 0.75,1
#plot "${FILE}" u 3:5
plot "${FILE}" u 7

pause -1
EOF
